package com.gof.example.visitor;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/11 17:53.
 * haiming.fei@tongdun.cn
 */
public class ResearchAwardCheck extends AwardCheck {

    @Override
    void visit(Teacher teacher) {
        int papers = teacher.getPapers();
        if (papers > 10) {
            System.out.println(teacher + ", achieve researchAwards");
        } else {
            System.out.println(teacher + ", achieve no researchAwards");
        }
    }

    @Override
    void visit(Student student) {
        int papers = student.getPapers();
        if (papers > 2) {
            System.out.println(student + ", achieve researchAwards");
        } else {
            System.out.println(student + ", achieve no researchAwards");
        }
    }
}
